import { del, get,post, put } from "./http"

 
/**
 * 列表查询机源
 * @param {*} params 
 * @returns 
 */
export const listItem = (params)=>{
  const url = `/api/item/list`
  return get(url,params)
}
/**
 * 删除机源
 * @param {*} id 
 * @returns 
 */
export const removeItem = (id)=>{
  const url = `/api/item/${id}`
  return del(url)
}
/**
 * 保存或者更新机源
 * @param {*} data 
 * @returns 
 */
export const saveItem = (data)=>{
  const url = `/api/item`
  return post(url,data)
}
/**
 * 根据ID查询机源
 */
export const getItemById = (id)=>{
  const url = `/api/item/${id}`
  return get(url)
}